<template>
    <div id="app" style="background-color: white;height: 170px">
        <vueLogoQrcode ref="qrcode"
                       :content="content"
                       :width="width"
                       :logoSrc="logoSrc"
                       :autoGen="false"
                       @click="clickHandle"
                       @click.native="downloadImage"></vueLogoQrcode>
    </div>
</template>

<script>
    import vueLogoQrcode from '@njshaoshao/vue-logo-qrcode';
    import logo from "@/assets/images/logo/logo-main.png"

    export default {
        name: 'logoQrcode',
        components: {vueLogoQrcode},
        props: {
            'content': {
                type: String,
                default: ""
            },
            'width': {
                type: Number,
                default: 175
            },
        },
        data() {
            return {
                // content: "shaojiasong",
                logoSrc: logo,
                // width: 150
            }
        },
        methods: {
            downloadImage() {
                this.$refs.qrcode.genQrCodeImageDownload();
            },
            clickHandle: function () {
                this.$refs.qrcode.genQrCode();
                this.$emit('click');
            }
        }
    }
</script>

<style lang="scss">
</style>